package com.wcar.system.feign.factory;

import com.wcar.common.entity.LoginLog;
import com.wcar.common.vo.Result;
import com.wcar.system.feign.WcarUserFeign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserFeignFactory implements FallbackFactory<WcarUserFeign> {
    @Override
    public WcarUserFeign create(Throwable throwable) {
        return new WcarUserFeign() {
            @Override
            public Result<Integer> addLoginLog(LoginLog user) {
                return new Result<Integer>(500,throwable.getMessage(),null);
            }

        };

    }
}
